<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>体重表格</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../css/jeui.css"  media="all">
    <link rel="stylesheet" href="../css/skin/jebox.css"  media="all">
    <link rel="stylesheet" href="../css/skin/jedate.css"  media="all">
    <script type="text/javascript" src="../js/modules/jeui.js"></script>
</head>
<body>
<div class="je-p20">
    <div id="testtwo" class="je-f14"></div>
</div>
<script type="text/javascript">
jeui.use(["jquery","jeTable"],function () {
    $("#testtwo").jeTable({
        width:"100%",
        height:500,
        datas:{
            url:"../daysever.php?act=select",
            data:{mydata:JSON.stringify({"star":0,"len":15})},
            type:"POST"
        },
        pageField:{
            pageIndex:{field:"size",num:1},
            pageSize:{field:"pagesize",num:15},
            ellipsis:true,
            dataCount:"mydata",
            pageCount:"totalPage" 
        },
        columnSort:[],
        columns:[
            {name:'ID', field:'id', width:"80", align: 'center', renderer: ""},
            { name:'时间', field:'time' , width:"200", align:'left' },
            {name:'体重',field:'grade', width:"200", align:'left'},
            {name:'摄入量',field:'grade', width:"200", align:'left'},
            { name:'运动量', field:'rank' ,width:"200", align:'left', renderer: ""},
            { name:'操作', field:'id' ,width:"200", align:'center',renderer: function(obj,rowidx){
                return '<button class="je-btn je-btn-small je-f12">编辑</button> <button class="je-btn je-btn-small je-bg-red je-f12">删除</button>';
            }}
        ],
        itemfun:function (elem,data) {
            elem.on("dblclick",function () {
                //var trdata = $.parseJSON($(this).attr("trdata"));
            })
        }
    })
});
</script>
</body>
</html>